﻿using Dapper;
using Sql_Windows_Sp_Tools.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;

namespace Sql_Windows_Sp_Tools.Repository
{
    public class TableRep
    {
        private string _DBConn;
        public TableRep(string DBConn)
        {
            _DBConn = DBConn;
        }
        public int ExecuteScalar(string sql)
        {
            using (IDbConnection db = new SqlConnection(_DBConn))
            {
                return db.ExecuteScalar<int>(sql);
            }
        }
    }
}
